package com.fantasy.entity;

import java.util.Date;
import java.util.Objects;
//用户实体类
public class User {
    //用户号
    private Integer id;
    //姓名
    private String name;
    //密码
    private String password;
    //电话
    private String phone;
    //头像
    private String headImg;
    //邮箱
    private String email;
    //状态  1已激活,0未激活
    private Integer state;
    //会员 1是会员，0普通用户
    private Integer vip;
    //注册日期
    private String registerDate;
    //介绍
    private String introduce;

    public User() {
    }

    public User(Integer id, String name, String password, String phone, String headImg, String email, Integer state, Integer vip, String registerDate, String introduce) {
        this.id = id;
        this.name = name;
        this.password = password;
        this.phone = phone;
        this.headImg = headImg;
        this.email = email;
        this.state = state;
        this.vip = vip;
        this.registerDate = registerDate;
        this.introduce = introduce;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getHeadImg() {
        return headImg;
    }

    public void setHeadImg(String headImg) {
        this.headImg = headImg;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getVip() {
        return vip;
    }

    public void setVip(Integer vip) {
        this.vip = vip;
    }

    public String getRegisterDate() {
        return registerDate;
    }

    public void setRegisterDate(String registerDate) {
        this.registerDate = registerDate;
    }

    public String getIntroduce() {
        return introduce;
    }

    public void setIntroduce(String introduce) {
        this.introduce = introduce;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return Objects.equals(id, user.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", password='" + password + '\'' +
                ", phone='" + phone + '\'' +
                ", headImg='" + headImg + '\'' +
                ", email='" + email + '\'' +
                ", state=" + state +
                ", vip=" + vip +
                ", registerDate=" + registerDate +
                ", introduce='" + introduce + '\'' +
                '}';
    }
}
